import React, {Component} from 'react';
import {StyleSheet, Image, Text, View, Alert,ScrollView, RefreshControl} from 'react-native';

class Mine extends Component{
    constructor(props){
        super(props);
        this.state = {
            text:'第二个页面'
        }
    }

    static navigationOptions = {
        tabBarLabel: '我的',
        tabBarIcon: ({focused}) => {
            if (focused) {
                return (
                    <Image style={styles.tabBarIcon} source={require('./assets/images/bg-on.png')}/>
                );
            }
            return (
                <Image style={styles.tabBarIcon} source={require('./assets/images/bg-off.png')}/>
            );
        }
    };

    render(){
        let {text} = this.state;
        return(
            <View style={styles.box}>
                <Text>{text}</Text>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    box:{
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    tabBarIcon:{
        width:25,
        height:25,
        marginRight:1.8
    }
})

export default Mine;